package dhadi.model;

public class Edge {
	private Node nodeA;
	private Node nodeB;
	
	public Edge(Node a, Node b)
	{
		this.nodeA = a;
		this.nodeB = b;
	}
	
	public Node getNodeA() {
		return this.nodeA;
	}
	
	public Node getNodeB() {
		return this.nodeB;
	}
	
	public boolean doesTouches(Node n) {
		return this.getNodeA().equals(n) || this.getNodeB().equals(n);
	}	

	@Override
	public String toString() {
		return "Edge [nodeA=" + nodeA + ", nodeB=" + nodeB + "]";
	}
}
